package com.kuzan.autocloud.gateway;

import com.kuzan.autocloud.gateway.filter.RequestTimeGatewayFilterFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

/**
 * <p>Description: </p>
 *
 * @author kuzank
 */
@SpringBootApplication
@EnableEurekaClient
@EnableFeignClients
@Configuration
@EnableJpaRepositories(basePackages = {"com.kuzan.autocloud.common.repository"})
@EntityScan(basePackages = {"com.kuzan.autocloud.common.model"})
public class GatewayApplication {

    public static void main(String[] args) {
        SpringApplication.run(GatewayApplication.class, args);
    }

    @Bean
    public RequestTimeGatewayFilterFactory requestTimeGatewayFilterFactory() {
        return new RequestTimeGatewayFilterFactory();
    }


}
